<?php
	echo $this->Html->css('form');
	echo $this->Html->script('jquery.validate');
	echo $this->Html->script('jquery.metadata');
?>
<div class="product-box">
<h3><a href=""><?php echo __('Liên hệ', true); ?></a></h3>
<p style="padding-top: 10px;">
	<?php echo __('Contact text', true);?>
	<?php echo $form->create(array(
		'id'			=> 'formValidation',
		'action' 		=> 'index',
		'enctype' 		=> 'multipart/form-data',
		'autocomplete'	=> 'off'));
	?>
         <div class="control-group">
            <label class="control-label"><?php echo __('Fullname', true); ?></label>
            <div class="controls">
            <?php
                echo $form->input(
                    'Contact.Fullname',
                    array(
                            'type'		=> 'text',
                            'label'		=> false,
                            'after'		=> ' <span class="require">*</span>',
                            'div'		=> false,
                            'validate'          => 'required:true',
                            'size'		=> 50,
                            'class'             => 'input-xlarge'
                    )
		);
            ?>
            </div>
        </div>
	<?php
		echo $form->input(
			'Contact.Email',
			array(
				'type'		=> 'text',
				'label'		=> __('Email', true),
				'after'		=> '<span class="require">*</span>',
				'div'		=> true,
				'size'		=> 50,
				'validate'	=> 'required:true,email:true',
                                'class'         => 'input-xlarge'
			)
		);
		echo $form->input(
			'Contact.Phone',
			array(
				'type'		=> 'text',
				'label'		=> __('Phone', true),
				'after'		=> '<span class="require">*</span>',
				'div'		=>true,
				'validate'	=> 'required:true,vnPhone:true',        
                                'class'         => 'input-xlarge'
			)
		);
		echo $form->input(
			'Contact.Address',
			array(
				'type'		=> 'text',
				'label'		=> __('Address', true),
				'after'		=> '<span class="require">*</span>',
				'div'		=> true,
				'validate'	=> 'required:true',
				'size'		=> 50,
                                'class'         => 'input-xlarge'
			)
		);
	?>
	<?php
		echo $form->input(
			'Contact.Title',
			array(
				'type'		=> 'text',
				'label'		=> __('Title', true),
				'after'		=> '<span class="require">*</span>',
				'div'		=> true,
				'size'		=> 50,
				'validate'	=> 'required:true',
                                'class'         => 'input-xlarge'
			)
		);
		echo $form->input(
			'Contact.Content',
			array(
				'type'		=> 'textarea',
				'label'		=> __('Content', true),
				'after'		=> '<span class="require">*</span>',
				'div'		=> true,
				'cols'		=> '48',
				'validate'	=> 'required:true',
                                'class'         => 'input-xlarge'
			)
		);
	?>
	<div class="input">
		<label><?php echo __('Security Code', true); ?></label>
		<?php
		echo $form->input(
			'Security.code',
			array(
				'type'		=> 'text',
				'label'		=> false,
				'div'		=> false,
				'size'		=> 6,
				'validate'	=> 'required:true',
				'value'		=> ''
			)
		);
		?>
		<img src="<?php echo $captcha_image_url; ?>" id="captcha" alt="CAPTCHA Image" />
		<?php
			echo "<br/>";
			echo (!empty($error_captcha)) ? '<span class="status">'.$error_captcha.'</span>' : '';
		?>
	</div>

	<div class="submit">
		<?php echo $form->button(__('Send', true), array('class'=>'h30x137 accept', 'type'=>'submit', 'id'=>'regSubmit')); ?>
		<?php echo $form->button(__('Change', true), array('class'=>'h30x137 reset', 'type'=>'reset')); ?>
	</div>
	<?php echo $form->end(); ?>
	<script type="text/javascript">
	$(document).ready(
		function() {
			$.metadata.setType("attr", "validate");
			$("form#formValidation").validate();
		}
	);
	</script>
</p>
</div>